#include<bits/stdc++.h>
using namespace std;
const int mod=998244353;
int n,m;
void sol(){
	cin>>n>>m;
	for(int i=1;i<=m;i++){
		int x,y;
		cin>>x>>y;
	}
	cout<<-2*(n-1)<<' '<<0<<''\n;
}
signed main(){
	freopen("oi.in","r",stdin);
	freopen("oi.out","w",stdout);
	int c,t;
	cin>>c>>t;
	while(t--)sol();
	return 0;
}
